/**
 * 
 */
package com.flashdeck.activity;

import com.flashdeck.R;
import com.flashdeck.Rotate3dAnimation;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.animation.AnimationUtils;
import android.widget.TextView;
import android.widget.ViewFlipper;

/**
 * @author Vincentas
 * 
 */
public class PlayDeckActivity extends Activity {

	/*
	 * (non-Javadoc)
	 * 
	 * @see android.app.Activity#onCreate(android.os.Bundle)
	 */
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.main);
		
		final ViewFlipper flipView = (ViewFlipper) findViewById(R.id.ViewFlipper01);

		
		Rotate3dAnimation animation = new Rotate3dAnimation(0, 180, 20, 20, 1, false);
		flipView.setAnimation(animation);
		//		flipView.setOutAnimation(this, R.anim.push_left_out);
		flipView.setOutAnimation(animation);
		
		OnClickListener onClickListener = new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				flipView.showNext();
			}
		};
		
		TextView text1 = (TextView) findViewById(R.id.TextView01);
		text1.setOnClickListener(onClickListener);
		
		TextView text2 = (TextView) findViewById(R.id.TextView02);
		text2.setOnClickListener(onClickListener);
	}
}
